package com.shijunhao.graduation.service.business;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shijunhao.graduation.domain.dto.BusinessNoteDto;
import com.shijunhao.graduation.domain.entity.BusinessNote;
import com.shijunhao.graduation.domain.vo.BusinessNoteListVo;
import com.shijunhao.graduation.domain.vo.BusinessNoteVo;
import com.shijunhao.graduation.domain.vo.SimpleNoteInfoVo;
import com.shijunhao.graduation.service.system.BaseService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author shijunhao
 * @since 2022-03-31
 */
public interface IBusinessNoteService extends BaseService<BusinessNote> {

    Long insert(BusinessNoteDto dto);
    /**
     * @param dto: 更新实体
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/27 5:15
     * @description: 更新文章信息
     */
    boolean update(BusinessNoteDto dto);

    /**
     * @param note: 文章信息
     * @return: com.shijunhao.graduation.domain.vo.BusinessNoteVo
     * @author: shijunhao
     * @date: 2022/4/10 16:53
     * @description: 转为详表信息
     */
    BusinessNoteVo mapping(BusinessNote note);

    /**
     * @param note: 文章信息
     * @return: java.lang.Long
     * @author: shijunhao
     * @date: 2022/4/10 16:53
     * @description: 转为简表信息
     */
    BusinessNoteListVo listVoMapping(BusinessNote note);

    /**
     * @param wrapper: 查询条件
     * @param page: 分页
     * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.shijunhao.graduation.domain.vo.BusinessNoteListVo>
     * @author: shijunhao
     * @date: 2022/4/11 0:32
     * @description: 文章分页简表列表
     */
    Page<BusinessNoteListVo> pageList(IPage<BusinessNote> page,Wrapper<BusinessNote> wrapper);

    /**
     * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.shijunhao.graduation.domain.vo.BusinessNoteListVo>
     * @author: shijunhao
     * @date: 2022/4/11 0:33
     * @description: 最新的
     */
    Page<BusinessNoteListVo> pageNew(IPage<BusinessNote> page);
    /**
     * @return: 如果是管理员则是全部，非管理员是自己的
     * @author: shijunhao
     * @date: 2022/4/27 0:15
     * @description: 我的
     */
    Page<BusinessNoteListVo> pageMine(IPage<BusinessNote> page, LambdaQueryWrapper<BusinessNote> wrapper);

    /**
     * @param id: 文章id
     * @return: boolean
     * @author: shijunhao
     * @date: 2022/4/27 4:55
     * @description: 删除文章信息
     */
    boolean delete(Long id);

    /**
     * @param entity: 实体信息
     * @return: com.shijunhao.graduation.domain.vo.SimpleNoteInfoVo
     * @author: shijunhao
     * @date: 2022/4/27 5:34
     * @description: 实体信息转简要详情信息
     */
    SimpleNoteInfoVo toSimpleInfo(BusinessNote entity);

    /**
     * @param id: 文章id
     * @return: com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.shijunhao.graduation.domain.vo.BusinessNoteListVo>
     * @author: shijunhao
     * @date: 2022/5/8 5:22
     * @description: 查询相关推荐
     */
    Page<BusinessNoteListVo> pageSuggest(Long id);
}
